package Level01;


import java.util.ArrayList;
import java.util.Arrays;

public class Three {
    public static <A> void printArr(A[] arr) {
        System.out.print("[");
        for (int i = 0; i < arr.length; i++) {
            if (i == arr.length - 1) {
                System.out.print(arr[i] + "]");
            } else {
                System.out.print(arr[i] + ",");
            }
        }
    }

    public static void main(String[] args) {
        Integer[] arr = {3, 6, 7, 1, 2};
        String[] arr1 = {"[", "]"};
        printArr(arr);
    }
}
